function [initial_locations] = create_initial_locations(number_of_nodes,X,Y,randomize)
    if randomize
        initial_locations = rand(number_of_nodes,2);

        initial_locations(:,1) = initial_locations(:,1) * X;
        initial_locations(:,2) = initial_locations(:,2) * Y;
    else
        
        % nodes placed in the middle, next to each other
       
        posY = Y/2;
        posX = X/(number_of_nodes+1);
        for i = 1:number_of_nodes
            initial_locations(i,1) = i*posX;
            initial_locations(i,2) = posY;
        end
        
    end
end
